# -*- conding:UTF-8 -*-

'''
@ Project: P7_5group_lotk
@ File: token_auth.py
@ Author: 罗婷
@ Date：2022/6/9 14:20
token 鉴权
'''
from flask import g, request

from common.utils.jwtToken_generate_check import check_token


def token_authcxx():
    print('########进入鉴权钩子########')
    token = request.headers.get('Authorization')
    print('鉴权里是否获取前端token:===?', token)
    payload = check_token(token)
    if payload:
        g.user_id = payload['user_id']
    else:
        pass




